<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<c:set var="queryList" value="${pageContext.request.contextPath}/role/list" />
<script type="text/javascript">
baseUrl = '${ctx}';
</script>
<style>
.select2-container--default .select2-selection--single {
	border-color: #d8dde6;
	border-radius: 0;
	height: 32px;
	
}
.select2-container{
	padding-top:2px;
}
</style>
<div class="iframe-cot pull-right"  id="smIframe" style="padding: 0;background:#FFFFFF;">
<div  style="background-color: #fff;padding: 16px 15px;margin:0;overflow:hidden;">
          <div class="content">
              <div class="left-cot" style="width:25%;margin-top:0px;">
                  <div class="tree-nav" style="overflow-y: auto;height:500px;">
                      
                      <div class="search-div">
                          <select name="select" id="appId" class="js-example-basic-single mt5" style="width:100%;" onchange="loadTree($(this).val())">
                             <%--  <c:if test="${empty appList }"> --%>
                                 <option value=""></option> 
                              <%-- </c:if> --%>
                              <c:forEach items="${appList }" var="app">
                              	<option value='${app.code }' >${app.name }</option>
                              </c:forEach>
                          </select>
                      </div>
                      <ul id="menuTree" class="ztree tree"></ul>
                      
                  </div>      
              </div>
              <div class="right-cot" id="menuInfo" style=" float: left;width:74%;border: 1px solid #ddd;border-top: 1px solid #008FC6;min-height:499px;padding-top:15px;">
                 <jsp:include page="menu_edit.jsp"></jsp:include>
                
              </div>
          <!--main end--> 
      </div>
      
</div>
</div>

<script src="${ctx}/static/js/select2-4.0.3/dist/js/select2.js?_v=${currentTime}"></script>
<script src="${ctx}/static/js/jquery.ztree.all-3.5.js?_v=${currentTime}"></script>
<%-- 
  <script src="${ctx}/static/js/jquery.validate.min.js?_v=${currentTime}" type="text/javascript"></script>
<script src="${ctx}/static/js/jquery.extend.validate.js?_v=${currentTime}" type="text/javascript"></script>
<script src="${ctx}/static/js/iam-util.js?_v=${currentTime}" type="text/javascript"></script>
 --%>
 
 
<script type="text/javascript">
$(function(){
	var appId =$("#appId").val();
	loadTree(appId);
	$(".js-example-basic-single").select2({
		placeholder:"请选择应用",
		'language':{
			'noResults':function(){
				return "<p>无符合条件数据</p>";
			}
		},
		escapeMarkup: function (markup) {
	        return markup;
	    }
	});
	
	
	
});
</script>